<template>
  <div>
    <h1>欢迎来到首页</h1>
    <p>这是一个简单的计数器。</p>
    <p>{{ counterStore.count }}</p>
    <button @click="counterStore.numAdd">增加</button>
    <button @click="counterStore.numDec">减少</button>
  </div>
</template>

<script setup>
  import { useCounterStore } from '@/stores/counter';
  
  const counterStore = useCounterStore()
</script>

<style scoped>
h1 {
  color: #333;
}

p {
  color: #666;
}
</style>